home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / tcp / amitcp / amitcp-api-22.lha / AmiTCP-2.2 / doc / netlib.doc < prev    next >
Encoding:
Text File  |  1993-10-21  |  25.8 KB  |  777 lines

  1. TABLE OF CONTENTS
  2.  
  3. netlib.doc/autoinitd
  4. netlib.doc/autoinit
  5. netlib.doc/charRead
  6. netlib.doc/getgrgid
  7. netlib.doc/getgrnam
  8. netlib.doc/gethostname
  9. netlib.doc/getpwnam
  10. netlib.doc/getpwuid
  11. netlib.doc/gettimeofday
  12. netlib.doc/group
  13. netlib.doc/lineRead
  14. netlib.doc/passwd
  15. netlib.doc/timerinit
  16. netlib.doc/autoinitd                                  netlib.doc/autoinitd
  17.  
  18.    NAME
  19.        autoinitd - SAS C Autoinitialization Functions for Daemons
  20.  
  21.    SYNOPSIS
  22.        void _STIopenSockets(void);
  23.        void _STDcloseSockets(void);
  24.        long server_socket;
  25.  
  26.    DESCRIPTION
  27.        These are SASC autoinitialization functions for internet daemons
  28.        started by inetd, Internet super-server. Upon startup, the server
  29.        socket is obtained with ObtainSocket() library call. If successful,
  30.        the socket id is stored to the global variable server_socket. If the
  31.        socket is not obtainable, the server_socket contains value -1. Upon
  32.        success, the server_socket contains value 0.  If the server_socket is
  33.        not valid, the server may try to accept() a new connection and act as
  34.        a stand-alone server.
  35.  
  36.    RESULT
  37.        server_socket - positive socket id for success or -1 for failure.
  38.  
  39.    NOTES
  40.        _STIopenSockets() also checks that the system version is at
  41.        least 37. It puts up a requester if the bsdsocket.library
  42.        is not found or is of wrong version.
  43.  
  44.        The autoinitialization and autotermination functions are
  45.        features specific to the SAS C6. However, these functions
  46.        can be used with other (ANSI) C compilers, too. Example
  47.        follows: 
  48.  
  49.        /* at start of main() */
  50.  
  51.        atexit(_STDcloseSockets);
  52.        _STDopenSockets();
  53.  
  54.    AUTHORS
  55.        Jarno Rajahalme, Pekka Pessi, 
  56.        the AmiTCP/IP Group <amitcp-group@hut.fi>,
  57.        Helsinki University of Technology, Finland.
  58.  
  59.    SEE ALSO
  60.        serveraccept(), netutil/inetd
  61. netlib.doc/autoinit                                     netlib.doc/autoinit
  62.  
  63.    NAME   
  64.        autoinit - SAS C Autoinitialization Functions 
  65.  
  66.    SYNOPSIS
  67.        _STIopenSockets()
  68.  
  69.        void _STIopenSockets(void)
  70.  
  71.        _STDcloseSockets()
  72.  
  73.        void _STDcloseSockets(void)
  74.  
  75.    FUNCTION
  76.        These functions open and close the bsdsocket.library at the
  77.        startup and exit of the program, respectively. For a
  78.        program to use these functions, it must be linked with
  79.        netlib:net.lib.
  80.  
  81.        If the library can be opened, the _STIopenSockets() calls
  82.        bsdsocket.library function SetErrnoPtr() to tell the
  83.        library the address and the size of the errno variable of
  84.        the calling program. 
  85.  
  86.    NOTES
  87.        _STIopenSockets() also checks that the system version is at
  88.        least 37. It puts up a requester if the bsdsocket.library
  89.        is not found or is of wrong version.
  90.  
  91.        The autoinitialization and autotermination functions are
  92.        features specific to the SAS C6. However, these functions
  93.        can be used with other (ANSI) C compilers, too. Example
  94.        follows: 
  95.  
  96.        /* at start of main() */
  97.  
  98.        atexit(_STDcloseSockets);
  99.        _STDopenSockets();
  100.  
  101.    BUGS
  102.  
  103.    SEE ALSO
  104.        bsdsocket.library/SetErrnoPtr(),
  105.        SAS/C 6 User's Guide p. 145 for details of
  106.        autoinitialization and autotermination functions.  
  107. netlib.doc/charRead                                     netlib.doc/charRead
  108.  
  109.    NAME
  110.        charRead -- read characters from socket one by one.
  111.  
  112.    SYNOPSIS
  113.        initCharRead(rc, fd)
  114.  
  115.        void initCharRead(struct CharRead *, int);
  116.  
  117.  
  118.        character = charRead(rc)
  119.  
  120.        int charRead(struct CharRead *);
  121.  
  122.  
  123.    DESCRIPTION
  124.        charRead is a macro package which return characters one by one 
  125.        from given socket input stream. The socket where data is to be read
  126.        is set by calling initCharRead(): rc is the pointer to charread
  127.        structure previously allocated. fd is the (socket) descriptor where
  128.        reading is to be done.
  129.  
  130.        charRead() returns the next character from input stream or one of
  131.        the following:
  132.  
  133.        RC_DO_SELECT    (-3)    - read input buffer is returned. Do select
  134.                                  before next call if you don't want charread
  135.                                  to block.
  136.  
  137.        RC_EOF          (-2)    - end-of-file condition has occurred.
  138.  
  139.        RC_ERROR        (-1)    - there has been an error while filling new
  140.                                  charread buffer. Check the value of Errno()
  141.  
  142.    NOTE
  143.        Always use variable of type int to store return value from charRead()
  144.        since the numeric value of characters returned may vary between
  145.        0 -255 (or even greater). As you may know, -3 equals 253 if of type
  146.        unsigned char.
  147.  
  148.    EXAMPLE
  149.        /*
  150.         * This piece of code shows how to use charread with select()
  151.         */
  152.        #include <sys/types.h>
  153.        #include <sys/socket.h>
  154.        #include <charread.h>
  155.  
  156.        main_loop(int sock)
  157.        {
  158.          struct CharRead rc;
  159.          fd_set readfds;
  160.          int c;
  161.  
  162.          initCharRead(&rc, sock);
  163.  
  164.          FD_ZERO(&readfds);
  165.  
  166.          while(1) {
  167.            FD_SET(sock, &readfds);     
  168.  
  169.            if (select(sock + 1. &readfds, NULL, NULL, NULL)) < 0) {
  170.              perror("select");
  171.              break;
  172.            }
  173.            if (FD_ISSET(sock, &readfds)) {
  174.              while((c = charRead(&rc)) >= 0)
  175.                handle_next_input_character(c);
  176.              if (c == RC_EOF)
  177.                break;
  178.              if (c == RC_ERROR) {
  179.                perror("charRead");
  180.                break;
  181.              }
  182.            }
  183.          }
  184.        }
  185.  
  186.     PORTABILITY
  187.        The source file charread.h should be able to be used in 
  188.        UNIX programs as is.
  189.  
  190.     AUTHORS
  191.        Tomi Ollila,
  192.        the AmiTCP/IP Group <amitcp-group@hut.fi>,
  193.  
  194.     SEE ALSO
  195.        lineRead(), bsdsocket.library/recv()
  196. netlib.doc/getgrgid                                     netlib.doc/getgrgid
  197.  
  198.   SEE ALSO 
  199.        getgrnam()
  200.  
  201. netlib.doc/getgrname                                    netlib.doc/getgrnam
  202.  
  203.   NAME
  204.        getgrnam, getgrgid - group database operations
  205.  
  206.   SYNOPSIS
  207.        #include <grp.h>
  208.  
  209.        struct group *
  210.        getgrname(const char *name)
  211.  
  212.        struct group *
  213.        getgrgid(gid_t gid)
  214.  
  215.   DESCRIPTION       
  216.        These functions operate on the group database file AmiTCP:db/group
  217.        which is described in netlib.doc/group. Each line of the database is
  218.        defined by the structure group found in the include file <grp.h>:
  219.  
  220.              struct group                                      
  221.              {                                                 
  222.                UBYTE  *gr_name;              /* Group name.  */
  223.                UBYTE  *gr_passwd;            /* Password.    */
  224.                ULONG   gr_gid;               /* Group ID.    */
  225.                UBYTE **gr_mem;               /* Member list. */
  226.               };
  227.  
  228.        The functions getgrnam() and getgrgid() search the group database for
  229.        the given group name pointed to by name or the group id pointed to by
  230.        gid, respectively, returning the first one encountered.  Identical
  231.        group names or group gids may result in undefined behavior.
  232.  
  233.   RETURN VALUES 
  234.        The functions getgrent(), getgrnam(), and getgrgid(), return a pointer
  235.        to the group entry if successful; if end-of-file is reached or an
  236.        error occurs a null pointer is returned.  The functions setgroupent()
  237.        and setgrent() return the value 1 if successful, otherwise the value 0
  238.        is returned.  The functions endgrent() and setgrfile() have no
  239.        return value.
  240.  
  241.   FILES
  242.        AmiTCP:db/group  group database file
  243.  
  244.   SEE ALSO
  245.        getpwnam(), group
  246.  
  247.   HISTORY       
  248.        The functions getgrnam() and getgrgid() appeared in Version 7 AT&T
  249.        UNIX.
  250.  
  251.   BUGS
  252.        The functions getgrnam() and getgrgid() leave their results in an
  253.        internal static object and return a pointer to that object. Subsequent
  254.        calls to the same function will modify the same object.
  255.  
  256.   COMPATIBILITY
  257.        The BSD passwd database handling routines getgrent(), setgrfile(),
  258.        endgrent(), setgroupent(), and setgrent() are fairly useless in a
  259.        networked environment and they are not implemented.
  260. netlib.doc/gethostname                               netlib.doc/gethostname
  261.  
  262.    NAME   
  263.        gethostname -- get the name of the host
  264.  
  265.    SYNOPSIS
  266.        error = gethostname(name, namelen);
  267.  
  268.        int gethostname(char *, int);
  269.  
  270.    FUNCTION
  271.        Get the name of the host to the buffer name of length namelen.
  272.        The name is taken from the environment variable "HOSTNAME"
  273.        where it SHOULD reside.
  274.  
  275.    INPUTS
  276.        name    - Pointer to the buffer where the name should be
  277.                  stored.
  278.        namelen - Length of the buffer name.
  279.  
  280.    RESULT
  281.        error   - 0 on success, -1 in case of an error. The global
  282.                  variable errno will be set to indicate the error as
  283.                  follows: 
  284.  
  285.                  ENOENT - The environment variable "HOSTNAME" is not
  286.                           found.
  287.   
  288.    EXAMPLE
  289.        char hostname[MAXHOSTNAMELEN];
  290.        int error;
  291.        
  292.        error = gethostname(hostname, sizeof(hostname));
  293.        if (error < 0)
  294.          exit(10);
  295.        
  296.        printf("My name is \"%s\".\n", hostname);
  297.  
  298.    NOTES
  299.        This function is included for source compatibility with Unix
  300.        systems.
  301.        The ENOENT errno value is AmiTCP/IP addition.
  302.  
  303.    BUGS
  304.        Unlike the Unix version, this version assures that the resulting
  305.        string is always NULL-terminated. 
  306.  
  307.        The hostname is fetched from environment variable, which may cause
  308.        environment collisions.
  309.  
  310.        There is no sethostname().
  311.  
  312.    SEE ALSO
  313.        getenv()
  314. netlib.doc/getpwnam                                     netlib.doc/getpwnam
  315.   NAME
  316.        getpwnam, getpwuid - password database operations
  317.  
  318.   SYNOPSIS
  319.        #include <sys/types.h>
  320.        #include <pwd.h>
  321.  
  322.        struct passwd *
  323.        getpwnam(const char *login)
  324.  
  325.        struct passwd *
  326.        getpwuid(uid_t uid)
  327.  
  328.   DESCRIPTION
  329.        These functions operate on the password database file which is
  330.        described in netlib.doc/passwd. Each entry in the database is defined by
  331.        the structure passwd found in the include file <pwd.h>:
  332.  
  333.               struct passwd
  334.               {
  335.                 UBYTE *pw_name;         /* Username */
  336.                 UBYTE *pw_passwd;       /* Encrypted password */
  337.                 ULONG  pw_uid;          /* User ID */
  338.                 ULONG  pw_gid;          /* Group ID */
  339.                 UBYTE *pw_gecos;        /* Real name etc */
  340.                 UBYTE *pw_dir;          /* Home directory */
  341.                 UBYTE *pw_shell;        /* Shell */
  342.               };
  343.  
  344.        The functions getpwnam() and getpwuid() search the password database
  345.        for the given login name or user uid, respectively, always returning
  346.        the first one encountered.
  347.  
  348.   RETURN VALUES       
  349.        The functions getpwnam() and getpwuid() return a valid pointer to a
  350.        passwd structure on success and a null pointer if end-of-file is
  351.        reached or an error occurs.
  352.  
  353.   FILES
  354.        AmiTCP:db/passwd    The password database file
  355.  
  356.   SEE ALSO
  357.        getgrgid(),  passwd
  358.  
  359.   HISTORY       
  360.        The getpwnam() and getpwuid() functions appeared in Version 7 AT&T
  361.        UNIX.
  362.  
  363.   BUGS 
  364.        The functions getpwnam() and getpwuid() leave their results in an
  365.        internal static object and return a pointer to that object. Subsequent
  366.        calls to the same function will modify the same object.
  367.  
  368.   COMPATIBILITY 
  369.        The BSD passwd database handling routines getpwent(), setpwfile(),
  370.        endpwent(), setpassent(), and setpwent() are fairly useless in a
  371.        networked environment and they are not implemented.
  372. netlib.doc/getpwuid                                     netlib.doc/getpwuid
  373.  
  374.   SEE ALSO 
  375.        getpwnam()
  376.  
  377. netlib.doc/gettimeofday                             netlib.doc/gettimeofday
  378.  
  379.    NAME   
  380.        gettimeofday - get date and time 
  381.  
  382.    SYNOPSIS
  383.        #include <sys/time.h>
  384.  
  385.        error = gettimeofday(tp, tzp)
  386.  
  387.        int gettimeofday(struct timeval *, struct timezone *)
  388.  
  389.    FUNCTION
  390.        The system's notion of the current Greenwich time and the
  391.        current time zone is obtained with the gettimeofday() call.
  392.        The time is expressed in seconds and microseconds since
  393.        midnight (0 hour), January 1, 1970.  The resolution of the
  394.        system clock is hardware dependent. If tzp is zero, the time
  395.        zone information will not be returned. Also, if your system
  396.        software is unable to provide time zone information, the
  397.        structure pointed by tzp will be filled with zeroes.
  398.   
  399.    PORTABILITY
  400.        UNIX
  401.  
  402.    INPUTS
  403.        The structures pointed to by tp and tzp are defined in
  404.        <sys/time.h> as:
  405.   
  406.             struct timeval {
  407.                  long tv_sec;      /* seconds since Jan. 1, 1970 */
  408.                  long tv_usec;     /* and microseconds */
  409.             };
  410.   
  411.             struct timezone {
  412.                  int  tz_minuteswest;   /* of Greenwich */
  413.                  int  tz_dsttime;  /* type of dst correction to apply */
  414.             };
  415.   
  416.        The timezone structure indicates the local time zone (meas-
  417.        ured in minutes of time westward from Greenwich), and a flag
  418.        that, if nonzero, indicates that Daylight Saving time
  419.        applies locally during the appropriate part of the year.
  420.  
  421.    RESULT
  422.        Returns 0 when successful and -1 with specific error code in 
  423.        errno in case of an error. No error codes are specified,
  424.        however.
  425.        
  426.    NOTES
  427.        gettimeofday() uses GetSysTime() function of the timer.device,
  428.        which is new to V36 of the device.
  429.  
  430.        Time zone information is available only if your system has
  431.        locale.library, which is included in all Amiga systems from
  432.        2.1 and up.
  433.  
  434.        Global variable TimerBase _must_ be initialized before
  435.        gettimeofday() is called. This is normally done automatically
  436.        by the autoinit module (timerinit.c) included in the net.lib.
  437.  
  438.    BUGS
  439.        The time zones are currently not supported.
  440.  
  441.    SEE ALSO
  442.        timer.device/GetSysTime()
  443. netlib.doc/group                                           netlib.doc/group
  444.  
  445.   NAME
  446.        group - format of the group permissions file
  447.  
  448.   DESCRIPTION     
  449.        The file <AmiTCP:db/group> consists of newline separated ASCII records,
  450.        one per group, containing four bar `|' separated fields. These fields
  451.        are as follows:
  452.      
  453.              group     Name of the group.
  454.              passwd    Group's encrypted password.
  455.              gid       The group's decimal ID.
  456.              member    Group members.
  457.  
  458.        The group field is the group name used for granting file access to
  459.        users who are members of the group.  The gid field is the number
  460.        associated with the group name.  They should both be unique across the
  461.        system (and often across a group of systems) since they control file
  462.        access.  The passwd field is an optional encrypted password.  This
  463.        field is rarely used and an asterisk is normally placed in it rather
  464.        than leaving it blank.  The member field contains the names of users
  465.        granted the priviledges of group. The member names are separated by
  466.        commas with out spaces or newlines.  A user is automatically in a group
  467.        if that group was specified in their AmiTCP:db/passwd entry and does
  468.        not need to be added to that group in the AmiTCP:db/group file.
  469.  
  470.   FILES
  471.        AmiTCP:db/group
  472.  
  473.   SEE ALSO
  474.        netlib/getgrgid(), netlib/getgrnam()
  475.  
  476.   BUGS
  477.        Group information is not necessarily stored to local file. The library
  478.        functions getgr*() are the preferred way to access the user database.
  479.  
  480.   COPYRIGHT
  481.        Copyright 1980, 1991 The Regents of the University of California.
  482.  
  483.   HISTORY
  484.        A group file format appeared in Version 6 AT&T UNIX.
  485. netlib.doc/lineRead                                     netlib.doc/lineRead
  486.  
  487.    NAME
  488.        lineRead -- read newline terminated strings from socket
  489.  
  490.    SYNOPSIS
  491.        initLineRead(rl, fd, lftype, bufsize)
  492.  
  493.        void initLineRead(struct LineRead *, int, int, int);
  494.  
  495.  
  496.        length = lineRead(rl)
  497.  
  498.        int lineread(struct LineRead *);
  499.  
  500.  
  501.    DESCRIPTION
  502.        lineRead() reads newline terminated strings from given descriptor
  503.        very efficiently. All the options needed are set by calling
  504.        initLineRead(): rl is the pointer to lineread structure previously
  505.        allocated. fd is the (socket) descriptor where reading is to be 
  506.        done. lftype can have following 3 values:
  507.  
  508.            RL_LFNOTREQ - Newline terminated strings are returned unless
  509.                          there is no newlines left in currently buffered
  510.                          input. In this case remaining buffer is returned.
  511.  
  512.            RL_LFREQLF  - If there is no newlines left in currently buffered
  513.                          input the remaining input data is copied at the
  514.                          start of buffer. Caller is informed that next
  515.                          call will fill the buffer (and it may block). 
  516.                          Lines are always returned with newline at the end
  517.                          unless the string is longer than whole buffer.
  518.  
  519.            RL_LFREQNUL  - Like LF_REQLF, but remaining newline is removed.
  520.                          Note here that lenght is one longer that actual
  521.                          string length since line that has only one 
  522.                          newline at the end would return length as 0
  523.                          which indigate string incomplete condition.
  524.  
  525.        bufsize is used to tell lineread how big the receive buffer is.
  526.        always put RL_BUFSIZE here since that value is used to determine
  527.        the memory allocated for the buffer. This option is given to you
  528.        so you may decide to use different buffer size than the default 
  529.        1024.
  530.  
  531.        lineRead() returns the newline terminated string in rl_line field
  532.        of lineread structure. Return values of lineRead() are:
  533.  
  534.             1 - RL_BUFSIZE     - normal length of returned string.
  535.  
  536.             0                  - If zero is returned just after select(), 
  537.                                  end-of-file condition has occurred.
  538.                                  Otherwise string is not completed yet. 
  539.                                  Make sure you call select() (or use non-
  540.                                  blocking IO) if you don't want next call 
  541.                                  to block.
  542.  
  543.            -1                  - if rl_Line field of lineread structure
  544.                                  is NULL, it indicates error condition.
  545.                                  If rl_Line points to start of string
  546.                                  buffer, input string has been longer
  547.                                  than buffer. In this case rl_Line points
  548.                                  to zero terminated string of length 
  549.                                  RL_BUFSIZE.
  550.  
  551.        You may modify the zero terminated string returned by lineRead() in 
  552.        any way, but memory around the string is private lineread memory.
  553.  
  554.    EXAMPLE
  555.        /*
  556.         * The following code shows how to use lineread with select()
  557.         */
  558.        #ifdef USE_LOW_MEMORY_BUFFER
  559.        #define RL_BUFSIZE 256
  560.        #endif
  561.  
  562.        #include <sys/types.h>
  563.        #ifdef AMIGA
  564.        #include <bsdsocket.h>
  565.        #endif
  566.        #include <lineread.h>
  567.  
  568.        #define NULL 0
  569.  
  570.        ...
  571.  
  572.        main_loop(int sock)
  573.        {
  574.          struct LineRead * rl;
  575.          int length;
  576.          fd_set reafdfs;
  577.  
  578.          if (rl = (struct LineRead *)AllocMem(sizeof (*rl), 0)) {
  579.  
  580.            initLineRead(rl, sock, LF_REQLF, RL_BUFSIZE);
  581.  
  582.            FD_ZERO(&readfds);
  583.  
  584.            while(1) {
  585.              FD_SET(sock, &readfds);
  586.  
  587.              if (select(sock + 1, &readfds, NULL, NULL, NULL)) < 0) {
  588.                perror("select");
  589.                break;
  590.              }
  591.              if (FD_ISSET(sock, &readfds))
  592.                if ((length = lineRead(rl)) == 0) /* EOF */
  593.                  break;
  594.                do {
  595.                  if (length > 0)
  596.                    write(1, rl->rl_Line, length); /* stdout. write() for */
  597.                                                   /* speed demonstration */
  598.                  else { /* length == -1 */
  599.                    if (rl->rl_Line == NULL); {
  600.                      perror("lineRead");
  601.                      break;
  602.                    }
  603.                    else {
  604.                      fprintf(stderr, "lineread input buffer overflow!\n");
  605.                      write(1, rl->rl_Line, RL_BUFSIZE);
  606.                      write(1, "\n", 1);
  607.                    }
  608.                  }
  609.                } while ((length = lineRead(rl)) != 0); /* 0 -> do select() */
  610.            }
  611.          FreeMem(rl, sizeof (*rl);
  612.          }
  613.          else
  614.            fprintf("AllocMem: Out Of memory\n");
  615.        }
  616.  
  617.     PORTABILITY
  618.        The source modules lineread.c and lineread.h should compile 
  619.        in UNIX machines as is.
  620.  
  621.     AUTHORS
  622.        Tomi Ollila,
  623.        the AmiTCP/IP Group <amitcp-group@hut.fi>,
  624.  
  625.     SEE ALSO
  626.        readChar(), bsdsocket.library/recv()
  627. netlib.doc/passwd                                          netlib.doc/passwd
  628.  
  629.   NAME
  630.        passwd - format of the password file
  631.  
  632.   DESCRIPTION
  633.        
  634.        The passwd files are files consisting of newline separated records, one
  635.        per user, containing seven bar (`|') separated fields. These fields are
  636.        as follows:
  637.  
  638.            name      User's login name.
  639.  
  640.            password  User's encrypted password.
  641.  
  642.            uid       User's id.
  643.  
  644.            gid       User's login group id.
  645.  
  646.            gecos     General information about the user.
  647.  
  648.            home_dir  User's home directory.
  649.  
  650.            shell     User's login shell.
  651.  
  652.        The name field is the login used to access the computer account, and
  653.        the uid field is the number associated with it. They should both be
  654.        unique across the system (and often across a group of systems) since
  655.        they control file access.
  656.  
  657.        While it is possible to have multiple entries with identical login
  658.        names and/or identical user id's, it is usually a mistake to do so.
  659.        Routines that manipulate these files will often return only one of the
  660.        multiple entries, and that one by random selection.
  661.  
  662.        The login name must never begin with a hyphen (`-'); also, it is
  663.        strongly suggested that neither upper-case characters or dots (`.') be
  664.        part of the name, as this tends to confuse mailers. No field may
  665.        contain a bar (`|') as this has been used to separate the fields in the
  666.        user database.
  667.  
  668.        The password field is the encrypted form of the password. The format of
  669.        the password field is still unclear, since the crypt() function is not
  670.        implemented. If you have a suitable one ready, please contact authors
  671.        <AmiTCP-Group@hut.fi>. Currently an asterisk `*' should be put into the
  672.        password field.
  673.  
  674.        If the password field is empty, no password will be required to gain
  675.        access to the machine.  This is almost invariably a mistake. Because
  676.        these files contain the encrypted user passwords, they should not be
  677.        readable by anyone without appropriate privileges.
  678.  
  679.        The group field is the group that the user will be placed in upon
  680.        login.
  681.  
  682.        The gecos field normally contains comma (`,') separated subfields as
  683.        follows:
  684.  
  685.            name           user's full name
  686.            office         user's office number
  687.            wphone         user's work phone number
  688.            hphone         user's home phone number
  689.  
  690.        This information is used by the finger program.
  691.  
  692.        The user's home directory is the full DOS path name where the user will
  693.        be placed on login.
  694.  
  695.        The shell field is the command interpreter the user prefers. If there
  696.        is nothing in the shell field, the CLI is assumed.
  697.  
  698.   FILES
  699.        AmiTCP:db/passwd
  700.  
  701.   SEE ALSO
  702.        netlib/getpwuid(), netlib/getpwnam()
  703.  
  704.   BUGS
  705.        User information should (and eventually will) be stored elsewhere. The
  706.        library functions getpw*() are the preferred way to access the user
  707.        database.
  708.  
  709.   COPYRIGHT
  710.        Copyright 1980, 1991 The Regents of the University of California.
  711.  
  712.   HISTORY
  713.        A passwd file format appeared in Version 6 AT&T UNIX.
  714.  
  715.        The used format is basically the same as in the Multiuser Library 1.3
  716.        and AS225r2 use, except the password field.
  717. netlib.doc/timerinit                                   netlib.doc/timerinit
  718.  
  719.    NAME   
  720.        timerinit - SAS C Autoinitialization Functions for timer.device
  721.  
  722.    SYNOPSIS
  723.        _STIopenTimer()
  724.  
  725.        void _STIopenTimer(void)
  726.  
  727.        _STDcloseTimer()
  728.  
  729.        void _STDcloseTimer(void)
  730.  
  731.    FUNCTION
  732.        These functions open and close the timer.device at the
  733.        startup and exit of the program, respectively. For a
  734.        program to use these functions, it must be linked with
  735.        netlib:net.lib.
  736.  
  737.        The opened device base is stored in the TimerBase global
  738.        variable.
  739.  
  740.        If the device can be opened, the _STIopenTimer() sets up the
  741.        time zone information, which is used by the gettimeofday()
  742.        function. 
  743.  
  744.    NOTES
  745.  
  746.        The time zone information is got from the environment variable
  747.        named TZ. The format for this variable is:
  748.  
  749.            zzznnnddd
  750.  
  751.        where zzz is three letter identifier for the time zone (for
  752.        example GMT), and the nnn is hours west from Greenwich on
  753.        range [-23,24] (negative values are to east). The last field
  754.        is the abbreviation for the local daylight saving time zone
  755.        (which is not interpreted by this version).
  756.        
  757.        If the TZ environment variable cannot be found, Greenwich Mean
  758.        Time (GMT) is used instead.
  759.        
  760.        The autoinitialization and autotermination functions are
  761.        features specific to the SAS C6. However, these functions
  762.        can be used with other (ANSI) C compilers, too. Example
  763.        follows: 
  764.  
  765.        /* at start of main() */
  766.  
  767.        atexit(_STDcloseTimer);
  768.        _STDopenTimer();
  769.  
  770.    BUGS
  771.        TZ "hours west from GMT" should be interpreted as float.
  772.  
  773.    SEE ALSO
  774.        netlib.doc/gettimeofday(),
  775.        SAS/C 6 User's Guide p. 145 for details of
  776.        autoinitialization and autotermination functions.  
  777.